package com.xiaoyu.lanling.feature.user.model

import `in`.srain.cube.request.JsonData

class UserBaseSetting(val jsonData: JsonData) {

    companion object {
        const val KEY_CUPID_AND_ACCOST_SWITCH = "cupidAndAccostSwitch"
        const val KEY_SHOW_ON_TV_SWITCH = "showOnTV"
    }

    var cupidAndAccostSwitch: Boolean = jsonData.optBoolean(KEY_CUPID_AND_ACCOST_SWITCH)
    var showOnTV: Boolean = jsonData.optBoolean(KEY_SHOW_ON_TV_SWITCH)

    fun toJson(): JsonData {
        val jsonData = JsonData.newMap()
        jsonData.put(KEY_CUPID_AND_ACCOST_SWITCH, cupidAndAccostSwitch)
        jsonData.put(KEY_SHOW_ON_TV_SWITCH, showOnTV)
        return jsonData
    }
}